package com.example.mydy.model;

import java.util.Date;

/**
 * 提现记录模型类
 */
public class WithdrawalRecord {
    private int id;                 // 记录ID
    private String username;        // 用户名
    private double amount;          // 提现金额
    private String alipayAccount;   // 支付宝账号
    private String alipayName;      // 支付宝实名
    private Date applyTime;         // 申请时间
    private Date processTime;       // 处理时间
    private String status;          // 状态：pending(待审核)、approved(已通过)、rejected(已拒绝)
    private String remarks;         // 备注（拒绝原因等）

    // 状态常量
    public static final String STATUS_PENDING = "pending";
    public static final String STATUS_APPROVED = "approved";
    public static final String STATUS_REJECTED = "rejected";

    // 默认构造函数
    public WithdrawalRecord() {
        this.applyTime = new Date();
        this.status = STATUS_PENDING;
    }

    // 带参数的构造函数
    public WithdrawalRecord(String username, double amount, String alipayAccount, String alipayName) {
        this.username = username;
        this.amount = amount;
        this.alipayAccount = alipayAccount;
        this.alipayName = alipayName;
        this.applyTime = new Date();
        this.status = STATUS_PENDING;
    }

    // Getters and Setters
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public double getAmount() {
        return amount;
    }

    public void setAmount(double amount) {
        this.amount = amount;
    }

    public String getAlipayAccount() {
        return alipayAccount;
    }

    public void setAlipayAccount(String alipayAccount) {
        this.alipayAccount = alipayAccount;
    }

    public String getAlipayName() {
        return alipayName;
    }

    public void setAlipayName(String alipayName) {
        this.alipayName = alipayName;
    }

    public Date getApplyTime() {
        return applyTime;
    }

    public void setApplyTime(Date applyTime) {
        this.applyTime = applyTime;
    }

    public Date getProcessTime() {
        return processTime;
    }

    public void setProcessTime(Date processTime) {
        this.processTime = processTime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    @Override
    public String toString() {
        return "WithdrawalRecord{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", amount=" + amount +
                ", alipayAccount='" + alipayAccount + '\'' +
                ", alipayName='" + alipayName + '\'' +
                ", applyTime=" + applyTime +
                ", processTime=" + processTime +
                ", status='" + status + '\'' +
                ", remarks='" + remarks + '\'' +
                '}';
    }
} 